import {
  http
} from './customer.js';

// 会话
function conversationGet(params) {
  http('/conversation/get', 'post', params)
}

// 发送信息
function conversationSendTextMessage(params) {
  http('/conversation/send_text_message', 'post', params)
}

// 消息列表
function conversationReceiveMessage(params) {
  http('/conversation/receive_message', 'post', params)
}

// 发送图片
function sendImageMessageUrl(params) {
  http('/conversation/send_image_message_url', 'post', params)
}

// 商品页跳转客服
function messageCompany(params) {
  http('/conversation/message_company', 'post', params)
}

// 变换客服 /conversation/get_transfer_conversation_info
function getTransferConversationInfo(params) {
  http('/conversation/get_transfer_conversation_info', 'post', params)
}

// 常见问题消息
function userQuestionList(params) {
  http('/chatbot/request_user_question_list', 'post', params)
}

// 常见问题列表消息
function userQuestionFullList(params) {
  http('/chatbot/request_user_full_question_list', 'post', params)
}

// 点击商品列表
function userProductList(params) {
  http('/chatbot/request_user_product_list', 'post', params)
}

// 点击商品列表
function submitProductList(params) {
  http('/chatbot/submit_user_product_list', 'post', params)
}

// 点赞
function submitFeedback(params) {
  http('/conversation/submit_bot_message_feedback', 'post', params)
}

// 转人工客服
function realCrm(params) {
  http('/conversation/request_real_crm', 'post', params)
}

// 转人工客服
function refund(params) {
  http('/conversation/request_refund_info', 'post', params)
}

// 暴露接口
export default {
  conversationGet,
  conversationSendTextMessage,
  conversationReceiveMessage,
  sendImageMessageUrl,
  messageCompany,
  getTransferConversationInfo,
  userQuestionList,
  userQuestionFullList,
  userProductList,
  submitProductList,
  submitFeedback,
  realCrm,
  refund
}